<html  xmlns:th="http://www.thymeleaf.org" >
<head>
    <meta charset="UTF-8" />
    <link href="css/carts.css" type="text/css" rel="stylesheet" th:href="@{/css/carts.css}"/>
    <link href="css/reset.css" type="text/css" rel="stylesheet" th:href="@{/css/reset.css}"/>
    <title>购物车</title>
</head>
<body>
<div th:if=" ${cartMaster.cartTotalNumber} le '0'" >
    <br/><br/><br/><br/>
    <div class="step step1">
        <h2 align="center" style="color: #cc0000">您的购物车里还没有宝贝!</h2><br/><br/>
    </div>
    <a href="/sellerFornt/index"><h2 align="center" style="color: #cc0000">去购物！>>>></h2></a>
</div>
<section class="cartMain" th:if=" ${cartMaster.cartTotalNumber} gt '0'">
    <form action="/order/submitOrders" method="post">
        <div class="cartMain_hd">
            <ul class="order_lists cartTop">
                <li class="list_chk">
                    <!--所有商品全选-->
                    <input type="checkbox" id="all" class="whole_check"/>
                    <label for="all"></label>
                    全选
                </li>
                <li class="list_con">商品信息</li>
                <li class="list_price">单价</li>
                <li class="list_amount">数量</li>
                <li class="list_sum">金额</li>
                <li class="list_op">操作</li>
            </ul>
        </div>
            <div class="cartBox" th:each="cart,index:${cartMaster.cartList}">
                <div class="order_content">
                    <ul class="order_lists">
                        <li class="list_chk">
                            <input type="checkbox" th:id="${index.count}" th:value="${cart.product.productId}" name="checked" class="son_check"/>
                            <label th:for="${index.count}"></label>
                        </li>
                        <li class="list_con">
                            <div class="list_img">
                                <a th:href="@{'/sellerProduct/findProductByProductId?productId='+${cart.product.productId}}">
                                    <img th:src="@{${cart.product.productIcon}}" alt=""/>
                                </a>
                            </div>
                            <div class="list_text">
                                <a th:href="@{'/sellerProduct/findProductByProductId?productId='+${cart.product.productId}}" th:text="${cart.product.productName}"></a>
                            </div>
                        </li>
                        <li class="list_price">
                            <p class="price" th:text="'￥'+${cart.product.productPrice}"></p>
                        </li>
                        <li class="list_amount">
                            <div class="amount_box">
                                <a  href="javascript:;" th:class="${cart.buyerNumber eq 1}? 'reduce reSty': 'reduce'">-</a>
                                <input type="text" name="pid" id="pid" th:value="${cart.cartId}" hidden="hidden" />
                                <input type="text" th:value="${cart.buyerNumber}" class="sum"/>
                                <a href="javascript:;" class="plus">+</a>
                            </div>
                        </li>
                        <li class="list_sum">
                            <p class="sum_price" th:text="'￥'+${cart.buyerNumber*cart.product.productPrice}"></p>
                        </li>
                        <li class="list_op">
                            <p class="del">
                                <a href="javaScript:void(0);" th:onclick="'delProduct(this)'" th:id="${cart.cartId}">移除商品</a>
                            </p>
                        </li>
                    </ul>
                </div>
            </div>
        <!--底部-->

        <div class="bar-wrapper">
            <div class="bar-right">
                <div class="piece">已选商品<strong class="piece_num">0</strong>件</div>
                <div class="totalMoney">共计: <strong class="total_text">0.00</strong></div>
                <div class="calBtn">
                    <input type="submit" value="提交订单" style="display: block;
                                                                width: 110px;
                                                                height: 50px;
                                                                color: white;
                                                                background: #d80000;
                                                                font-size: 22px;
                                                                letter-spacing: 5px;
                                                                text-decoration: none;
                                                                line-height: 50px;
                                                                text-align: center;
                                                                border-radius: 2px;"/>
                </div><span style="color: #d80000"></span>
            </div>
        </div>
    </form>
</section>

<script src="lib/jquery/1.9.1/jquery.min.js" type="text/javascript" th:src="@{/lib/jquery/1.9.1/jquery.min.js}" ></script>
<script src="lib/layer/2.4/layer.js" type="text/javascript" th:src="@{/lib/layer/2.4/layer.js}" ></script>
<script src="backStageJs/car.js" type="text/javascript" th:src="@{/backStageJs/car.js}" ></script>

<!--<script type="text/javascript" th:inline="javascript">

</script>-->


</body>
</html>